package com.pet.platform.dto;

import lombok.Data;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
public class OrderItemDTO {
    private Long id;
    private Long orderId;
    
    @NotNull(message = "商品ID不能为空")
    private Long productId;
    
    private String productName;
    private String productImage;
    
    @NotNull(message = "商品价格不能为空")
    private BigDecimal price;
    
    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量必须大于0")
    private Integer quantity;
    
    private BigDecimal subtotal;
} 